package jDev.SimEngine.Interfaces.Players;

import jDev.SimEngine.Implementation.PlayerImpl.PlayerImpl;

import java.util.ArrayList;
import java.util.HashMap;

public class ICreateKI_Player    {

	private HashMap<Integer, String> corporationList;
	private HashMap<Integer, String> buildingList;


	public ICreateKI_Player(HashMap<Integer, String> corporationList, HashMap<Integer, String> buildingList) {
		this.corporationList = corporationList;
		this.buildingList = buildingList;
		
		
	}



	public ArrayList<PlayerImpl> createPlayers() {
		int corporationsSize = corporationList.size();
		ArrayList<PlayerImpl> activePlayerList = new ArrayList<PlayerImpl>();
		while(corporationsSize!=0){
			PlayerImpl KIplayer = new PlayerImpl(corporationList.get(corporationsSize), buildingList);
			
			activePlayerList.add(KIplayer);
			new Thread(KIplayer).start();
			corporationsSize--;
		}
		return activePlayerList;
		
	}




	
	


}
